AR=arm-linux-ar
LD=arm-linux-ld
CC=arm-linux-gcc
CFLAGS= -Wall -O3 -march=armv4 -mtune=arm9tdmi -msoft-float -fno-common

LDFLAGS += -lpthread 

OBJ1 = h264e.o ratecontrol.o
OBJ2 = h264d.o

all:  h264e h264d

h264e: $(OBJ1)
	arm-linux-gcc $(OBJ1) -lc -lm -o h264e
	cp h264e /tmp/h264e

h264d: $(OBJ2)
	arm-linux-gcc $(OBJ2) -lc -lm -o h264d
	cp h264d /tmp/h264d

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<
	
Makefile.depend depend:
	arm-linux-gcc $(CFLAGS) -MM -MG *.c > Makefile.depend
	
clean:
	rm -f *.o
	rm -f h264e
	rm -f h264d
